home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_3.5 / Include / include_i / workbench / icon.i < prev    next >
Encoding:
Text File  |  1999-10-20  |  9.6 KB  |  303 lines

  1.     IFND    WORKBENCH_ICON_I
  2. WORKBENCH_ICON_I    SET    1
  3. **
  4. **    $VER: icon.i 44.8 (14.9.1999)
  5. **    Includes Release 44.1
  6. **
  7. **    External declarations for icon.library
  8. **
  9. **    Copyright © 1985-1999 Amiga, Inc.
  10. **        All Rights Reserved
  11. **
  12.  
  13.     IFND    GRAPHICS_VIEW_I
  14.     INCLUDE    "graphics/view.i"
  15.     ENDC
  16.  
  17.     IFND    INTUITION_IMAGECLASS_I
  18.     INCLUDE    "intuition/imageclass.i"
  19.     ENDC
  20.  
  21.     IFND    UTILITY_TAGITEM_I
  22.     INCLUDE    "utility/tagitem.i"
  23.     ENDC
  24.  
  25.     IFND    DATATYPES_PICTURECLASS_I
  26.     INCLUDE    "datatypes/pictureclass.i"
  27.     ENDC
  28.  
  29.     IFND    DOS_DOS_I
  30.     INCLUDE    "dos/dos.i"
  31.     ENDC
  32.  
  33. ;------------------------------------------------------------------------------
  34.  
  35. ICONNAME    MACRO
  36.         DC.B    'icon.library',0
  37.         ENDM
  38.  
  39. ;------------------------------------------------------------------------------
  40.  
  41. ICONA_Dummy    equ (TAG_USER+$9000)
  42.  
  43. ;------------------------------------------------------------------------------
  44.  
  45. ; Error reporting (LONG *)
  46. ICONA_ErrorCode     equ (ICONA_Dummy+1)
  47.  
  48. ; Points to the tag item that caused the error (struct TagItem **).
  49. ICONA_ErrorTagItem    equ (ICONA_Dummy+75)
  50.  
  51. ;------------------------------------------------------------------------------
  52.  
  53. ; Global options for IconControlA()
  54.  
  55. ; Screen to use for remapping Workbench icons to (struct Screen *)
  56. ICONCTRLA_SetGlobalScreen            equ (ICONA_Dummy+2)
  57. ICONCTRLA_GetGlobalScreen            equ (ICONA_Dummy+3)
  58.  
  59. ; Icon color remapping precision; defaults to PRECISION_ICON (LONG)
  60. ICONCTRLA_SetGlobalPrecision            equ (ICONA_Dummy+4)
  61. ICONCTRLA_GetGlobalPrecision            equ (ICONA_Dummy+5)
  62.  
  63. ; Icon border size dimensions (struct Rectangle *)
  64. ICONCTRLA_SetGlobalEmbossRect            equ (ICONA_Dummy+6)
  65. ICONCTRLA_GetGlobalEmbossRect            equ (ICONA_Dummy+7)
  66.  
  67. ; Render image without frame (BOOL)
  68. ICONCTRLA_SetGlobalFrameless            equ (ICONA_Dummy+8)
  69. ICONCTRLA_GetGlobalFrameless            equ (ICONA_Dummy+9)
  70.  
  71. ; Enable NewIcons support (BOOL)
  72. ICONCTRLA_SetGlobalNewIconsSupport        equ (ICONA_Dummy+10)
  73. ICONCTRLA_GetGlobalNewIconsSupport        equ (ICONA_Dummy+11)
  74.  
  75. ; Enable color icon support (BOOL)
  76. ICONCTRLA_SetGlobalColorIconSupport        equ (ICONA_Dummy+77)
  77. ICONCTRLA_GetGlobalColorIconSupport        equ (ICONA_Dummy+78)
  78.  
  79. ; Set/Get the hook to be called when identifying a file (struct Hook *)
  80. ICONCTRLA_SetGlobalIdentifyHook            equ (ICONA_Dummy+12)
  81. ICONCTRLA_GetGlobalIdentifyHook            equ (ICONA_Dummy+13)
  82.  
  83. ; Set/get the maximum length of a file/drawer name supported
  84. ; by icon.library (LONG).
  85. ICONCTRLA_SetGlobalMaxNameLength        equ (ICONA_Dummy+67)
  86. ICONCTRLA_GetGlobalMaxNameLength        equ (ICONA_Dummy+68)
  87.  
  88. ;------------------------------------------------------------------------------
  89.  
  90. ; Per icon local options for IconControlA()
  91.  
  92. ; Get the icon rendering masks (PLANEPTR)
  93. ICONCTRLA_GetImageMask1            equ (ICONA_Dummy+14)
  94. ICONCTRLA_GetImageMask2            equ (ICONA_Dummy+15)
  95.  
  96. ; Transparent image color; set to -1 if opaque
  97. ICONCTRLA_SetTransparentColor1        equ (ICONA_Dummy+16)
  98. ICONCTRLA_GetTransparentColor1        equ (ICONA_Dummy+17)
  99. ICONCTRLA_SetTransparentColor2        equ (ICONA_Dummy+18)
  100. ICONCTRLA_GetTransparentColor2        equ (ICONA_Dummy+19)
  101.  
  102. ; Image color palette (struct ColorRegister *)
  103. ICONCTRLA_SetPalette1            equ (ICONA_Dummy+20)
  104. ICONCTRLA_GetPalette1            equ (ICONA_Dummy+21)
  105. ICONCTRLA_SetPalette2            equ (ICONA_Dummy+22)
  106. ICONCTRLA_GetPalette2            equ (ICONA_Dummy+23)
  107.  
  108. ; Size of image color palette (LONG)
  109. ICONCTRLA_SetPaletteSize1        equ (ICONA_Dummy+24)
  110. ICONCTRLA_GetPaletteSize1        equ (ICONA_Dummy+25)
  111. ICONCTRLA_SetPaletteSize2        equ (ICONA_Dummy+26)
  112. ICONCTRLA_GetPaletteSize2        equ (ICONA_Dummy+27)
  113.  
  114. ; Image data; one by per pixel (UBYTE *)
  115. ICONCTRLA_SetImageData1            equ (ICONA_Dummy+28)
  116. ICONCTRLA_GetImageData1            equ (ICONA_Dummy+29)
  117. ICONCTRLA_SetImageData2            equ (ICONA_Dummy+30)
  118. ICONCTRLA_GetImageData2            equ (ICONA_Dummy+31)
  119.  
  120. ; Render image without frame (BOOL)
  121. ICONCTRLA_SetFrameless            equ (ICONA_Dummy+32)
  122. ICONCTRLA_GetFrameless            equ (ICONA_Dummy+33)
  123.  
  124. ; Enable NewIcons support (BOOL)
  125. ICONCTRLA_SetNewIconsSupport        equ (ICONA_Dummy+34)
  126. ICONCTRLA_GetNewIconsSupport        equ (ICONA_Dummy+35)
  127.  
  128. ; Icon aspect ratio (UBYTE *)
  129. ICONCTRLA_SetAspectRatio        equ (ICONA_Dummy+36)
  130. ICONCTRLA_GetAspectRatio        equ (ICONA_Dummy+37)
  131.  
  132. ; Icon dimensions; valid only for palette mapped icon images (LONG)
  133. ICONCTRLA_SetWidth            equ (ICONA_Dummy+38)
  134. ICONCTRLA_GetWidth            equ (ICONA_Dummy+39)
  135. ICONCTRLA_SetHeight            equ (ICONA_Dummy+40)
  136. ICONCTRLA_GetHeight            equ (ICONA_Dummy+41)
  137.  
  138. ; Check whether the icon is palette mapped (LONG *).
  139. ICONCTRLA_IsPaletteMapped        equ (ICONA_Dummy+42)
  140.  
  141. ; Get the screen the icon is attached to (struct Screen **).
  142. ICONCTRLA_GetScreen            equ (ICONA_Dummy+43)
  143.  
  144. ; Check whether the icon has a real select image (LONG *).
  145. ICONCTRLA_HasRealImage2            equ (ICONA_Dummy+44)
  146.  
  147. ; Check whether the icon is of the NewIcon type (LONG *).
  148. ICONCTRLA_IsNewIcon            equ (ICONA_Dummy+79)
  149.  
  150. ; Check whether this icon was allocated by icon.library
  151. ; or if consists solely of a statically allocated
  152. ; struct DiskObject. (LONG *).
  153. ICONCTRLA_IsNativeIcon            equ (ICONA_Dummy+80)
  154.  
  155. ;------------------------------------------------------------------------------
  156.  
  157. ; Icon aspect ratio is not known.
  158. ICON_ASPECT_RATIO_UNKNOWN equ (0)
  159.  
  160. ;------------------------------------------------------------------------------
  161.  
  162. ; Tags for use with GetIconTagList()
  163.  
  164. ; Default icon type to retrieve (LONG)
  165. ICONGETA_GetDefaultType            equ (ICONA_Dummy+45)
  166.  
  167. ; Retrieve default icon for the given name (STRPTR)
  168. ICONGETA_GetDefaultName            equ (ICONA_Dummy+46)
  169.  
  170. ; Return a default icon if the requested icon
  171. ; file cannot be found (BOOL).
  172. ICONGETA_FailIfUnavailable        equ (ICONA_Dummy+47)
  173.  
  174. ; If possible, retrieve a palette mapped icon (BOOL).
  175. ICONGETA_GetPaletteMappedIcon        equ (ICONA_Dummy+48)
  176.  
  177. ; Set if the icon returned is a default icon (BOOL *).
  178. ICONGETA_IsDefaultIcon            equ (ICONA_Dummy+49)
  179.  
  180. ; Remap the icon to the default screen, if possible (BOOL).
  181. ICONGETA_RemapIcon            equ (ICONA_Dummy+50)
  182.  
  183. ; Generate icon image masks (BOOL).
  184. ICONGETA_GenerateImageMasks        equ (ICONA_Dummy+51)
  185.  
  186. ; Label text to be assigned to the icon (STRPTR).
  187. ICONGETA_Label                equ (ICONA_Dummy+52)
  188.  
  189. ; Screen to remap the icon to (struct Screen *).
  190. ICONGETA_Screen                equ (ICONA_Dummy+69)
  191.  
  192. ;------------------------------------------------------------------------------
  193.  
  194. ; Tags for use with PutIconTagList()
  195.  
  196. ; Notify Workbench of the icon being written (BOOL)
  197. ICONPUTA_NotifyWorkbench        equ (ICONA_Dummy+53)
  198.  
  199. ; Store icon as the default for this type (LONG)
  200. ICONPUTA_PutDefaultType            equ (ICONA_Dummy+54)
  201.  
  202. ; Store icon as a default for the given name (STRPTR)
  203. ICONPUTA_PutDefaultName            equ (ICONA_Dummy+55)
  204.  
  205. ; When storing a palette mapped icon, don't save the
  206. ; the original planar icon image with the file. Replace
  207. ; it with a tiny replacement image.
  208. ICONPUTA_DropPlanarIconImage        equ (ICONA_Dummy+56)
  209.  
  210. ; Don't write the chunky icon image data to disk.
  211. ICONPUTA_DropChunkyIconImage        equ (ICONA_Dummy+57)
  212.  
  213. ; Don't write the NewIcons tool types to disk.
  214. ICONPUTA_DropNewIconToolTypes        equ (ICONA_Dummy+58)
  215.  
  216. ; If this tag is enabled, the writer will examine the
  217. ; icon image data to find out whether it can compress
  218. ; it more efficiently. This may take extra time and
  219. ; is not generally recommended.
  220. ICONPUTA_OptimizeImageSpace        equ (ICONA_Dummy+59)
  221.  
  222. ; Don't write the entire icon file back to disk,
  223. ; only change the do->do_CurrentX/do->do_CurrentY
  224. ; members.
  225. ICONPUTA_OnlyUpdatePosition        equ (ICONA_Dummy+72)
  226.  
  227. ; Before writing a palette mapped icon back to disk,
  228. ; icon.library will make sure that the original
  229. ; planar image data is stored in the file. If you
  230. ; don't want that to happen, set this option to
  231. ; FALSE. This will allow you to change the planar icon
  232. ; image data written back to disk.
  233. ICONPUTA_PreserveOldIconImages        equ (ICONA_Dummy+84)
  234.  
  235. ;------------------------------------------------------------------------------
  236.  
  237. ; For use with the file identification hook.
  238.  
  239.    STRUCTURE IconIdentifyMsg,0
  240.     ; Libraries that are already opened for your use.
  241.     APTR    iim_SysBase
  242.     APTR    iim_DOSBase
  243.     APTR    iim_UtilityBase
  244.     APTR    iim_IconBase
  245.  
  246.     ; File context information.
  247.     BPTR    iim_FileLock    ; Lock on the object to return an icon for.
  248.     BPTR    iim_ParentLock    ; Lock on the object's parent directory, if available.
  249.     APTR    iim_FIB        ; Already initialized for you.
  250.     BPTR    iim_FileHandle    ; If non-NULL, pointer to the file to examine,
  251.                 ; positioned right at the first byte, ready
  252.                 ; for you to use.
  253.  
  254.     APTR    iim_Tags    ; Tags passed to GetIconTagList().
  255.     LABEL IconIdentifyMsg_SIZEOF
  256.  
  257. ;------------------------------------------------------------------------------
  258.  
  259. ; Tags for use with DupDiskObjectA()
  260.  
  261. ; Duplicate do_DrawerData
  262. ICONDUPA_DuplicateDrawerData        equ (ICONA_Dummy+60)
  263.  
  264. ; Duplicate the Image structures.
  265. ICONDUPA_DuplicateImages        equ (ICONA_Dummy+61)
  266.  
  267. ; Duplicate the image data (Image->ImageData) itself.
  268. ICONDUPA_DuplicateImageData        equ (ICONA_Dummy+62)
  269.  
  270. ; Duplicate the default tool.
  271. ICONDUPA_DuplicateDefaultTool        equ (ICONA_Dummy+63)
  272.  
  273. ; Duplicate the tool types list.
  274. ICONDUPA_DuplicateToolTypes        equ (ICONA_Dummy+64)
  275.  
  276. ; Duplicate the tool window.
  277. ICONDUPA_DuplicateToolWindow        equ (ICONA_Dummy+65)
  278.  
  279. ; If the icon to be duplicated is in fact a palette mapped
  280. ; icon which has never been set up to be displayed on the
  281. ; screen, turn the duplicate into that palette mapped icon.
  282. ICONDUPA_ActivateImageData        equ (ICONA_Dummy+82)
  283.  
  284. ;------------------------------------------------------------------------------
  285.  
  286. ; Tags for use with DrawIconStateA() and GetIconRectangleA().
  287.  
  288. ; Drawing information to use (struct DrawInfo *).
  289. ICONDRAWA_DrawInfo         equ (ICONA_Dummy+66)
  290.  
  291. ; Draw the icon without the surrounding frame (BOOL).
  292. ICONDRAWA_Frameless        equ (ICONA_Dummy+70)
  293.  
  294. ; Erase the background before drawing a borderless icon (BOOL).
  295. ICONDRAWA_EraseBackground    equ (ICONA_Dummy+71)
  296.  
  297. ; Draw the icon without the surrounding border and frame (BOOL).
  298. ICONDRAWA_Borderless        equ (ICONA_Dummy+83)
  299.  
  300. ;------------------------------------------------------------------------------
  301.  
  302.     ENDC ; WORKBENCH_ICON_I
  303.